package cn.wizzer.app.user.modules.models.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum BizTypeEnum {
    //正负表示收\支
    CASH("转出",-1),
    RECHARGE("充值",1),
    GIFT_ORDER("礼物支出",-2),
    GIFT_INCOME("礼物收入",2),
    BALL_BET("球类下注",-3),
    // 当赛事状态异常时，回退下注金额
    BALL_REVERT("球注撤销",3),
    BALL_RESULT("球注结算",4),
    BALL_RESETTLE("球注重新结算", 5),
    BALL_DEDUCT("球注结算金额扣除", -6),
    EXCHANGE("兑换",-7),
    EXCHANGE_BACK("兑换退还",7),
    TRANSFER("转账",-8),
    COLLECT("收款",8),
    SELF_REBATE("自身返利",9),
    SUB_REBATE("下级返水",10),
    BUY_VIEW_POINT("购买观点",-11),
    REFUND_VIEW_POINT("观点退款",11),
    SELL_VIEW_POINT("出售观点",12),
    RETURN_VIEW_POINT("观点退还重新结算",-12),
    TRANSFER_CANCEL("转账退还", 13),
    ACTIVITY_COST_REBATE("(活动)自身消费返利", 14),
    ACTIVITY_INVITE_REBATE("(活动)邀请消费返利", 15)
    ;
    final public String NAME;
    final public int VALUE;


    BizTypeEnum(String name,int val) {
        NAME = name;
        VALUE = val;
    }

    public String getNAME() {
        return NAME;
    }

    public int getVALUE() {
        return VALUE;
    }

    public static List toList() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (BizTypeEnum bizTypeEnum : BizTypeEnum.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("name", bizTypeEnum.getNAME());
            map.put("val", bizTypeEnum);
            list.add(map);
        }
        return list;
    }
}


